import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_zxing_ohos/src/models/models.dart';


void main() {
  test('getName', () {
    final String name =  Format.qrCode.name;
    expect(name, 'QR Code');
  });

  test('getRatio', () {
    final double ratio =  Format.qrCode.ratio;
    expect(ratio, 1.0);
  });

  test('getDemoText', () {
    final String demoText =  Format.qrCode.demoText;
    expect(demoText, 'This is a QR Code');
  });

  test('getMaxTextLength', () {
    final int maxTextLength =  Format.qrCode.maxTextLength;
    expect(maxTextLength, 4296);
  });

  test('getIsSupportedEccLevel', () {
    final bool isSupportedEccLevel =  Format.qrCode.isSupportedEccLevel;
    expect(isSupportedEccLevel, true);
  });

  test('getSupportedEncodeFormats', () {
    final bool supportedEncodeFormats =  CodeFormat.supportedEncodeFormats.contains(Format.qrCode);
    expect(supportedEncodeFormats, true);
  });
}
